/*
 * @Description:
 * @Author: wangyigang
 * @Date: 2022-08-08 13:52:26
 * @LastEditTime: 2022-08-12 14:39:17
 * @LastEditors: wangyigang
 */
import 'antd/dist/antd.css';
import "../styles/globals.css";
import { useEffect } from "react";
import Router from "next/router";
import styles from "../styles/Home.module.css";
import Layout from "../compoents/layout";
function MyApp({ Component, pageProps }) {
  useEffect(() => {
    const handleRouteChange = (url) => {
      console.log("App is changing to: ", url);
      console.log(window.location.href, "看看windows", this);
    };
    Router.events.on("routeChangeStart", handleRouteChange);
    return () => {
      Router.events.off("routeChangeStart", handleRouteChange);
    };
  }, []);

  return (
    <Layout>
      <Component {...pageProps} />
    </Layout>
  );
}

export default MyApp;
